//
//  LocationView.h
//  RealatorView
//
//  Created by Ricky Jones on 1/25/09.
//  Copyright 2009 Vaporsoftware. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@class Location;
@class RealatorViewAppDelegate;
@interface LocationViewController : UIViewController<UINavigationControllerDelegate,UIImagePickerControllerDelegate,CLLocationManagerDelegate> {

	Location* _location; 
	UIBarButtonItem* _saveButton;
	
	UITextField* _nameTextBox;
	UITextField* _address1TextBox;
	UITextField* _address2TextBox;
	UITextField* _cityTextBox; 
	UITextField* _stateTextBox;	
	UITextField* _zipTextBox;
	UIImagePickerController* _imagePicker;
	UIImageView* _imageView;
	CLLocationManager* _locationManager;
	RealatorViewAppDelegate *_appDelegate;
}

- (IBAction)saveImageButton_pressed:(id)sender;
-(Location*)GetDisplayedLocation;
- (IBAction)selectImage:(id)sender;
- (IBAction)SetLocation_ButtonPressed:(id) sender;
-(IBAction)ViewOnMap_ButtonPressed:(id) sender;

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo;

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;

@property(retain,nonatomic) IBOutlet UITextField* NameTextBox;
@property(retain,nonatomic) IBOutlet UITextField* Address1TextBox;
@property(retain,nonatomic) IBOutlet UITextField* Address2TextBox;
@property(retain,nonatomic) IBOutlet UITextField* CityTextBox;
@property(retain,nonatomic) IBOutlet UITextField* StateTextBox;
@property(retain,nonatomic) IBOutlet UITextField* ZipTextBox;
@property(retain,nonatomic) IBOutlet UIImageView* ImageView;

@property(retain,nonatomic) Location* CurrentLocation;
@property(retain,nonatomic) IBOutlet UIBarButtonItem* SaveButton;
@end
